#include <iostream>
#include <string>
using namespace std;

int main() {

    string str;
    getline(cin, str);

    int n = str.size();

    string res = "";

    if (str[0] >= 'a')
        res += str[0] - 32;
    else
        res += str[0];

    for (int i = 1; i < n; i++)
    {
        if (str[i - 1] == ' ' && str[i] >= 'A' && str[i] <= 'z')
        {

            if (str[i] >= 'a')
                res += str[i] - 32;
            else
                res += str[i];
        }
    }

    cout << res << endl;
    return 0;
}